home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / MISC.SWG / 0097_Scrolling or page down.pas < prev    next >
Pascal/Delphi Source File  |  1994-05-26  |  1KB  |  35 lines

  1.  
  2. function More: string;
  3. var
  4.   Prompt: char;
  5. begin
  6.   More:='';
  7.   if Pause and (Lines=mem[$40:$84]) then
  8.     begin
  9.       write('Continue - [Y]es, [N]o? ');
  10.       Prompt:=ReadKey;
  11.       writeln(upcase(Prompt));
  12.       if Prompt in ['N','n'] then
  13.         halt(0)
  14.       Lines:=0
  15.     end;
  16.   inc(Lines)
  17. end;      {More}
  18.  
  19. Pause and Lines are both global variables.  Since I call the function
  20. from many other functions/procedures I decided it would be less work
  21. then passing them through.  Pause is simple a flag deciding whether or
  22. not you want pausing or not.  You may not want to take the same action I
  23. did when the user doesn't want to continue.  The mem command looks at
  24. memory location 0040:0084 which contains the number of lines on the
  25. screen.  This prevents the need to check what mode the screen is in.
  26.  
  27. Anyways, the way I used it is as follows:
  28.  
  29. writeln(More,'What ever you may want to display');
  30.  
  31. Since functions are executed first, it determines wheter or not to
  32. display the line or prompt to continue.
  33.  
  34. Hope that helps... (assuming you can figure out my explanations)
  35.